<?php
class model_lhbase_authuseraccess extends gdl_components_basemodel 
{

    public function primarykey() {
        return 'id';
    }
	
	public function getInfoArg($arrg=[],$field)
    {
		if(empty($arrg)) return false;
		return $this->select($arrg, $field)->items;
    }

    public function tableName() {
        return 'lh_auth_user_access';
    }

	public function buttons($userId,$appId){
		$condition = 'userId='.$userId.' and appId='.$appId; //
		$ruleId = [0];
		$ruleIdArr = $this->select($condition,'ruleId')->items;
		if(!empty($ruleIdArr)){
			$ruleId = array_column($ruleIdArr,'ruleId');
		}
		return $ruleId;
	}
	
	 
	
	
}
